package com.quectel.sdk.simulation.monitor;

import com.quectel.sdk.simulation.SimulationClientBuilder;
import com.quectel.sdk.simulation.basemodel.SimulationDevice;

import java.util.Arrays;
import java.util.List;

/**
 * @author rananxin
 * @email ryan.ran@quectel.com
 * @date 2022/11/4 10:11
 */
public class MonitorTest {


    public static void main(String[] args) {
        printStreamUrls();
    }

    public static void printStreamUrls() {
        MonitorClient monitorClient = SimulationClientBuilder
                .builder()
                .url("https://dev-smartcity.quectel.com:10443/simulation/")
                .accessKey("202211241200")
                .accessSecret("j/uTngw6LWlWqw==")
                .build(MonitorClient.class);
        List<String> urls = monitorClient.getStreamUrls(
                Arrays.asList("abc", "bQmd7JvHqRsraw", "ss")
        );
        System.out.println(urls);
    }

    public static void printMonitors() {
        MonitorClient monitorClient = SimulationClientBuilder
                .builder()
                .url("http://localhost:12345/simulation/")
                .accessKey("202211241200")
                .accessSecret("j/uTngw6LWlWqw==")
                .build(MonitorClient.class);
        List<SimulationDevice> monitors = monitorClient.getMonitors();
        System.out.println(monitors);
    }
}
